//
//  AsyncRequest.m
//  PlugHunter
//
//  Created by siloon on 6/2/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "SLAsyncRequest.h"

@implementation SLAsyncRequest

@synthesize delegate = _delegate;

- (id)init {
    self = [super init];
    if (self) {
		InitAndDeallocLog(@"%@ init",NSStringFromClass([self class]));
    }
    return self;
}

- (void)dealloc {
	InitAndDeallocLog(@"%@ dealloc",NSStringFromClass([self class]));
    [super dealloc];
}

- (void)notifyDelegateWithError:(NSError *)error{
	if([self.delegate respondsToSelector:@selector(request:didFailWithError:)]){
		[self.delegate request:self didFailWithError:error];
	}
}

- (void)notifyDelegateWithData:(id)data{
	if([self.delegate respondsToSelector:@selector(request:didFinishWithData:)]){
		[self.delegate request:self didFinishWithData:data];
	}
}


@end
